package com.yueman.ptoolopenticket.ticket.exception;


import com.yueman.ptoolopenticket.ticket.utils.Constant;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public class RRException extends RuntimeException{
    private static final long serialVersionUID = 1L;

    /**
     * 错误提示
     */
    private String message;

    /**
     * 错误明细，内部调试错误
     *
     * 和 {@link } 一致的设计
     */
    private String code= Constant.FAIL_CODE;

    /**
     * 空构造方法，避免反序列化问题
     */
    public RRException()
    {
    }

    public RRException(String message)
    {
        this.message = message;
    }

    public String getDetailMessage()
    {
        return code;
    }

    public RRException setDetailMessage(String detailMessage)
    {
        this.message = detailMessage;
        return this;
    }

    @Override
    public String getMessage()
    {
        return message;
    }

    public RRException setMessage(String message)
    {
        this.message = message;
        return this;
    }

}
